<?php 
class listAction extends AdminMasterUploadControl{
	public function execute($request){
		//checking authentication
		$path = $request->getParameter('path', '');
		$max_depth = $request->getParameter('max_depth', 0);
		$filter = $request->getParameter('filter','*');
		$buttons = $request->getParameter('buttons','');
		if(empty($buttons)) $buttons = 'upload|select|remove|rename|reload|mkdir|language';
		if($path=='') $path=='all';
		if($filter=='') $filter='*';
		$this->setVar('path',str_replace('/', '\/', $path));
		$this->setVar('max_depth', $max_depth);
		$this->setVar('upload_control','/admin'.$this->generateUrl('upload_control_file',array('sf_culture'=>$this->getUser()->getCulture())));
		$this->setVar('info','/admin'.$this->generateUrl('upload_control_info',array('sf_culture'=>$this->getUser()->getCulture())));
		$this->setVar('filter',$filter);
		$this->setVar('buttons',$buttons);
	}
}